package com;

import java.util.ArrayList;

public class Demo2 {
    public static void main(String[] args) {
        ArrayList<String> list=new ArrayList<>();

        list.add("迪丽热巴");
        list.add("古力娜扎");
        list.add("马尔扎哈");

        list.add(0,"德玛西亚");

        String s=list.remove(3);

        boolean bl=list.remove("德玛西亚");

        String s1=list.set(0,"叽里呱啦");

        System.out.println(list.get(1));

        System.out.println(list.size());

        System.out.println(list);

        for (int i = 0; i < list.size(); i++) {
            System.out.print(list.get(i)+"  ");
        }

    }
}
